import React, { Component } from "react";
import { Button } from 'antd';
import { Consumer, BatteryContext } from '../context.js'

export default class Leaf extends Component {
    static contextType = BatteryContext;
    render() {
        let theme = this.context;
        console.log(theme);
        return (
            <div>
                {/* <Consumer> */}
                    {/* {theme => { */}
                        {/* // console.log(theme) */}
                        {/* return ( */}
                            <Button
                                style={{ backgroundColor: theme.background }}
                            >ll</Button>
                        {/* ) */}
                    {/* }} */}
                {/* </Consumer> */}
            </div>
        )
    }
}